<script>

CreateProject=function()
	{
		var newProject=new Object();
		newProject.module="Projects.CreateProject";
		newProject.projectName=$("ProjectName").getValue();
		
		
		new Ajax.Request('Model.php', {
			method: 'post',
			parameters: newProject,
			onSuccess: function(transport){
				var JSONtext = transport.responseText;
				var JSONobject = JSON.parse(JSONtext);
				if(JSONobject['result']==1)
						popup('popUpDiv');
				else
					$("warning").update(JSONobject['error']);
			},
			onFailure: function(){
				$("warning").update("Could not connect to server");
			}
		})
	

	} 
</script>
<form method="post">
<div><h1>Create new Project</h1> 
<table class="PopupClass">
	<tr><td class="PopupClassLegend">Project Name: </td><td><input type="Text" id="ProjectName" /></td></tr>
	<tr><td class="PopupClassLegend">Client</td><td><select id="clients"></select> </td></tr>
	<tr><td class="PopupClassLegend">Owner</td><td><select id="clients"></select> </td></tr>
	<tr><td class="PopupClassLegend">Description</td><td><textarea id="elm1" name="elm1" rows="7" cols="80" style="width: 80%"></textarea></td></tr>
	</tr>
</table>
<table><tr><td ><input type="button" onClick="CreateProject();" value="Create Project"><input type="button" onclick="popup('popUpDiv');" value="Cancel"></td><td></td></tr></table>
</form>
</div>